<section class="content-header">
  <h1>{{title}}</h1>
  <ol class="breadcrumb">
    <li><a ui-sref="dashboard"><i class="fa fa-dashboard"></i>我的面板</a></li>
    <li><a href="javascript:;" ng-click="goParent()">列表</a></li>
    <li class="active" ng-bind="current_bread"></li>
  </ol>
</section>
<section class="content">
  <form class="form-horizontal" id="notice_form" style="padding-bottom: 50px;">
    <div class="detail-view-header-wrapper">
      <div class="box-footer detail-view-header" ui-scrollpoint ui-scrollpoint-enabled="true" ui-scrollpoint-class="fixed">
        <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
        <button type="button" class="btn btn-info" ng-click="save()">保存</button>
      </div>
    </div>
    <div class="box box-danger">
      <div class="box-header with-border">
        <h3 class="box-title">基本信息</h3>
        <div class="box-tools">
          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
          </div>
        </div>
      </div>
      <div class="box-body">
        <div class="form-group">
          <label class="col-sm-1 control-label">主题<span class="required">*</span></label>
          <div class="col-sm-8">
            <input type="text" class="form-control" name="title" ng-model="data.title" data-rule="required; length[~50];">
          </div>
        </div>
        <div class="form-group" ng-if="data.type==1">
          <label class="col-sm-1 control-label">编号</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" name="code" ng-model="data.code" data-rule="length[~20];">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-1 control-label">内容</label>
          <div class="col-sm-8">
            <textarea id="editor1" name="editor1" rows="10" cols="80">
            </textarea>
          </div>
        </div>
        <div class="form-group" ng-repeat="attachment in data.attachments">
          <label class="col-sm-1 control-label" ng-bind="$index == 0 ? '附件' : ''"></label>
          <div class="col-sm-8">
            <a href="{{attachment.attachment_url}}" target="_blank" style="display: inline-block; line-height: 30px;">{{attachment.name}}</a>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-1 control-label" ng-bind="data.attachments.length == 0 ? '附件' : ''"></label>
          <div class="col-sm-8">
            <a href="javascript:;" id="btnUpload" style="display: inline-block; line-height: 30px;">{{btnUploadText}}</a>
          </div>
        </div>
      </div>
    </div>
  </form>
</section>
